package com.sporch.component;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author: czy
 */
@Component
@RabbitListener(queues="sms")
public class SmsListener {
    @RabbitHandler
    public void sendSms(Map<String,String> message){
        String mobile = message.get("mobile");
        System.err.println("手机号:"+message.get("mobile"));
        String code = message.get("code");
        System.err.println("验证码:"+message.get("code"));
    }
}
